{include file="header/index" /}
<meta charset="UTF-8">

	<body>
		<div class="container bgwhite">
			<p class="databaseBackup-top">
				<button class="backup" onclick="backup();">立即备份</button>
				<button class="optimization">优化表</button>
				<button class="repair">修复表</button>
			</p>
			<div class="table-responsive mt20">
			<form id="export-form" method="post" action="">
				<table class="table table-bordered">
					<thead>
						<tr>
							<th><input type="checkbox" name="all" value="" ></th>
							<th>表名</th>
							<th>数据量</th>
							<th>数据大小</th>
							<th>创建时间</th>
							<th>备份状态</th>
							<th>操作</th>	
						</tr>
					</thead>
					<tbody>
						{foreach $data as $k => $v}
							<tr>
								<td><input  type="checkbox" class="Subpage" name="ids[]" value="{$v.name}" checked="chedked"></td>
								<td>{$v.name}</td>
								<td>【{$v.rows}】条记录</td>
								<td>{$v.data_length|format_bytes}</td>
								<td>{$v.create_time}</td>
								<td id="info">等待备份...</td>
								<td>
									<button type="button" class="operatOptimi" onclick="optimizeOne('{$v.name}',this)">优化表</button>
									<button type="button"  class="operatRepair" onclick="repairOne('{$v.name}',this)">修复表</button>
								</td>
							</tr>
						{/foreach}
					</tbody>
				</table>
				</form>
				
				<p class="fr">第1页,共1页</p>
			</div>
			
			
			<!-- <div class="pag clearfix">
				<p class="fl pagNum">共4条记录&nbsp;&nbsp;1/1页</p>
				<p class="fl JumpPage clearfix">	
					<a href="javascript:(0)">首页</a>
					<a href="javascript:(0)"><img class="fl mr5" src="__IMG__/shang.png">上一页</a>
					<a href="javascript:(0)">下一页<img src="__IMG__/xia.png"  class="fr ml5"></a>
				</p>
				<p class="fl pageber">
					跳转至第<select>
						<option>1</option>
						<option>2</option>
						<option>3</option>
					</select>页
				</p>
				<p class="fl pageber">
					每页显示<select>
						<option>10</option>
						<option>20</option>
						<option>30</option>
					</select>条
				</p>
			</div>
		</div> -->
		<script type="text/javascript" src="__JS__/data.js"></script>
		<script>
			$("input[name='all']").click(function(){
				if($(this).is(":checked")){
					$(".Subpage").prop("checked",true)
				}else{
					$(".Subpage").prop("checked",false)
				}
			});  
			/* $(".backup").click(function(){

				$(this).text("备份完成，点击重新备份")
			}) */ 
			
			
			
		</script>
	</body>
</html>
